def get_chinese_count_by_str(str):
    """
        获取字符串中中文字符数量
    :param str:
    :return:
    """
    chinese_cont = 0
    for c in str:
        if 0X4E00 <= ord(c) <= 0X9FA5:
            chinese_cont += 1
    return chinese_cont


print(get_chinese_count_by_str('aaa中国bbbbbb'))
